#define _CRT_SECURE_NO_WARNINGS 1

#include<bits/stdc++.h>

using namespace std;

typedef long long ll;


int main()
{
	int t;
	cin >> t;
	ll arr[6];

	while (t--)
	{
		for (int i = 0; i < 6; i++)
			cin >> arr[i];
		int flag = 0;

		sort(arr, arr + 6);
		if ((arr[0] + arr[1] > arr[2] && arr[3] + arr[4] > arr[5])
			|| (arr[0] + arr[2] > arr[3] && arr[1] + arr[4] > arr[5])
			|| (arr[0] + arr[3] > arr[4] && arr[1] + arr[2] > arr[5])
			|| (arr[0] + arr[4] > arr[5] && arr[1] + arr[2] > arr[3]))
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
		
	}

	return 0;
}